Skip to main content
Version: current

route


routing/route

Type: Directory

A read-only table that lists routes from all the address families as well as all filtered routes with all possible route attributes.

Default example output of the table with various route types:

[admin@MikroTik] /routing/route> print
Flags: A - ACTIVE; c, s, a, l, y - COPY; H - HW-OFFLOADED
Columns: DST-ADDRESS, GATEWAY, AFI, DISTANCE, SCOPE, TARGET-SCOPE, IMMEDIATE-GW
DST-ADDRESS GATEWAY AFI D SCOPE TA IMMEDIATE-GW
lH 10.0.0.0/8 ip4 0
;;; defconf
As 10.0.0.0/8 10.155.130.1 ip4 1 30 10 10.155.130.1%ether1
lH 10.155.130.0/25 ip4 0
Ac 10.155.130.0/25 ether1 ip4 0 10 ether1
aH 10.155.130.12/32 ip4 0
lH 111.13.0.0/24 ip4 0
Ac 111.13.0.0/24 ether2 ip4 0 10 ether2
aH 111.13.0.1/32 ip4 0
Ac 111.111.111.2/32 loopback@vrfTest ip4 0 10 loopback
Ac 2111:4::/64 ether2 ip6 0 10 ether2
Ac fe80::%ether1/64 ether1 ip6 0 10 ether1
Ac fe80::%ether2/64 ether2 ip6 0 10 ether2
Ac fe80::%ether3/64 ether3 ip6 0 10 ether3
Ac fe80::%ether4/64 ether4 ip6 0 10 ether4
Ac 3333::2/128 loopback@vrfTest ip6 0 10 loopback
Ac fe80::%loopback/64 loopback@vrfTest ip6 0 10 loopback
Ay 111.111.111.2/32&65530:100 loopback@vrfTest vpn4 0 10 5 loopback
Ay 3333::2/128&65530:100 loopback@vrfTest vpn6 0 10 5 loopback
A H ether1 link 0
A H ether2 link 0
A H ether3 link 0
A H ether4 link 0
A H loopback link 0

Detailed example output with some BGP, OSPF, and other routes:

[admin@MikroTik] /routing/route> print detail
Flags: X - disabled, F - filtered, U - unreachable, A - active;
c - connect, s - static, r - rip, b - bgp, o - ospf, d - dhcp, v - vpn, m - modem, a - ldp-address, l - ldp-mapping, y - copy; H - hw-offloaded;
+ - ecmp, B - blackhole
o afi=ip4 contribution=best-candidate dst-address=0.0.0.0/0 routing-table=main gateway=10.155.101.1%ether1 immediate-gw=10.155.101.1%ether1
distance=110 scope=20 target-scope=10 belongs-to="OSPF route"
ospf.metric=2 .tag=111 .type=ext-type-1
debug.fwp-ptr=0x203425A0

Ad + afi=ip4 contribution=active dst-address=0.0.0.0/0 routing-table=main pref-src="" gateway=10.155.101.1 immediate-gw=10.155.101.1%ether1
distance=1 scope=30 target-scope=10 vrf-interface=ether1 belongs-to="DHCP route"
debug.fwp-ptr=0x20342060

As + afi=ip4 contribution=active dst-address=0.0.0.0/0 routing-table=main pref-src="" gateway=10.155.101.1 immediate-gw=10.155.101.1%ether1
distance=1 scope=30 target-scope=10 belongs-to="Static route"
debug.fwp-ptr=0x20342060

Fb afi=ip4 contribution=filtered dst-address=1.0.0.0/24 routing-table=main gateway=10.155.101.1 immediate-gw=10.155.101.1%ether1 distance=20
scope=40 target-scope=10 belongs-to="BGP IP routes from 10.155.101.217" rpki=valid
bgp.peer-cache-id=*B000002 .aggregator="13335:172.68.180.1" .as-path="65530,100,9002,13335" .atomic-aggregate=yes .origin=igp
debug.fwp-ptr=0x20342960


missing hw-offloaded (yes | no) Indicates whether the route is eligible to be hardware offloaded on supported hardware.

FlagNameDescription
Xdisableddisabled
FfilteredA flag indicates whether the route was filtered by routing filters and excluded from being used as the best route.
UunreachableA flag indicates whether the route next-hop is unreachable.
AactiveA flag indicates whether the route is elected as Active and eligible to be added to the FIB.
cconnectconnect
sstaticstatic
rriprip
bbgpA flag indicates whether this route was added by the BGP protocol.
nbgp-netbgp-net
oospfospf
iisisisis
ddhcpA flag indicates whether the route was added by the DHCP service.
vvpnA flag indicates whether the route was added by one of the VPN protocols (PPPoE, L2TP, SSTP, etc.)
mmodemA flag indicates whether the route is added by the LTE or 3g modems.
aldp-addressA flag indicates whether the route entry is an LDP address.
lldp-mappingA flag indicates whether the route entry is the LDP mapping.
gslaacslaac
ybgp-mpls-vpnA flag indicates a copy of the route to be redistributed as the L3VPN route. VPNv4/6 related attributes are attached to this route.
eevpnevpn
Hhw-offloadedhw-offloaded
+ecmpA flag indicates whether the route is added as an Equal-Cost Multi-Path route in the FIB
BblackholeA flag indicates whether it is a blackhole route.
Read-only ArgumentTypeDescription
afi ( unset )enum (bad | ip | ipv6 | l2vpn | vpnv4 | vpnv6 | l2vpn-cisco | mip4 | mip6 | link | l2vpn-link | evpn)Address family this route belongs to.
contributionenum (filtered | unreachable | candidate | best-candidate | active)Shows the route status contributing to the election process, e.g "filtered, active, candidate"
dst-addressaddress (flags=46i/SR)
routing-tableenumRouting table this route belongs to.
ve-idnum
ve-block-offsetnum
ve-block-sizenum
labelnum
pref-src ( unset )address (flags=46)
gatewayaddress (flags=46ivL)Configured gateway, for the actually resolved gateway, see immediate-gw parameter.
nexthop-id ( unset )num
immediate-gwmulti_arg { address (flags=46i) }Shows actual (resolved) gateway and interface that will be used for packet forwarding. Displayed in format [ip%interface].
check-gateway ( unset )enum (none | arp | ping | bfd)Currently used check-gateway option.
distance ( unset )num
scope ( unset )numScope used in the next-hop lookup process. Read more>>
target-scope ( unset )numTarget scope used in next-hop lookup process. Read more>>.
vrf-interface ( unset )interface_enumInternal use only parameter which allows identifying to which VRF route should be added. Used by services that add routes dynamically, for example, DHCP client. Shown for debugging purposes.
belongs-tostringDescriptive info showing from where the route was received.
local-addressaddress (flags=46iv)Local IP address of the connected network.
route-costnum
total-costnum
rpki ( unset )enum (unknown | valid | invalid)Current status of the prefix from the RPKI validation process.
bgp.sessionenumBGP session that installed the route. See /routing/bgp/session menu.
bgp.aggregatorstring
bgp.as-pathstringValue of the AS_PATH BGP attribute.
bgp.cluster-liststring
bgp.communitiesmulti_arg { string }Value of the COMMUNITIES BGP attribute.
bgp.ext-communitiesmulti_arg { string }Value of the EXTENDED_COMMUNITIES BGP attribute.
bgp.large-communitiesmulti_arg { string }Value of the LARGE_COMMUNITIES BGP attribute.
bgp.unknownmulti_arg { string }Hex blob of unknown BGP attributes.
bgp.originator-idaddress (flags=4)
bgp.nexthopmulti_arg { address (flags=4) }
bgp.out-nexthopmulti_arg { address (flags=4iv) }
bgp.weightnum
bgp.local-prefnumValue of the LOCAL_PREF BGP attribute.
bgp.igp-metricnumValue of the IGP_METRIC BGP attribute
bgp.pmsistring
bgp.mednumValue of the MED BGP attribute.
bgp.atomic-aggregatebool
bgp.originenum (igp | egp | incomplete)
bgp.esistring
bgp.otcnum
route-distinguisherstring
rip.tagnum
rip.metricnum
ospf.metricnum
ospf.tagnum
ospf.typeenum (intra | inter | ext-type-1 | ext-type-2 | nssa-type-1 | nssa-type-2)
isis.typeenum (l1 | l2 | l1-inter | l1-ext | l2-ext | l1-inter-ext)
isis.metricnum
mpls.labelsmulti_arg { num }
mpls.in-labelnumMapped MPLS ingress label.
mpls.out-labelnumMapped MPLS egress label.
ldp.peer-idnum
ldp.labelnumLDP mapped MPLS label.
mtunum
hoplimitnum
debug.fwp-ptrnum
debug.route-ptrnum
debug.input.refsnum
debug.input.sizenum
debug.input.ptrnum
debug.input.rawstring
debug.merge.refsnum
debug.merge.sizenum
debug.merge.ptrnum
debug.merge.rawstring

routing/route/rule

Type: Directory

FlagNameDescription
Xdisableddisabled
Iinactiveinactive
ArgumentTypeDescription
src-address ( unset )address (flags=4iv/)
dst-address ( unset )address (flags=4iv/)
routing-mark ( unset )enum
interface ( unset )interface_enum
actionenum (lookup | lookup-only-in-table | unreachable | drop)
tableenum ()
min-prefix ( unset )num